from django.urls import path, re_path

from sales import myviews

urlpatterns = [
    path('login/', myviews.login, name='login'),
    path('logout/', myviews.logout, name='logout'),
    # 注册
    path('register/', myviews.register, name='register'),
    # 首页
    path('home/', myviews.home, name='home'),
    # 所有客户信息展示
    re_path('^customers/', myviews.CustomerView.as_view(), name='customers'),
    path('mycustomers/', myviews.CustomerView.as_view(), name='mycustomers'),
    # path('add_customer/', views.add_customer, name='add_customer'),
    path('add_customer/', myviews.add_edit_customer, name='add_customer'),
    # path('edit_customer/<int:cid>/', views.edit_customer, name='edit_customer'),
    path('edit_customer/<int:cid>/', myviews.add_edit_customer, name='edit_customer'),
    # 跟进记录展示
    path('consult_record/', myviews.ConsultRecordView.as_view(), name='consult_record')
]